/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadPoolExecutor;

/**
 * <p>Project: jse2204 - T4
 * <p>Powered by webrx On 2022-09-29 14:30:54
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class T4 {

    public static void show() {
        String t = Thread.currentThread().getName();
        System.out.println(t + "线程启动");
        for (int i = 0; i <= 2; i++) {
            System.out.printf("%s : %d%n",t,i);
        }
    }

    public static void main(String[] args) {
        ExecutorService es = Executors.newFixedThreadPool(5);
        for (int i = 0; i < 2; i++) {
            es.execute(T4::show);
        }
    }
}
